//
// Created by wze-zero on 2024/7/10 010.
//
#include <iostream>

using namespace std;

int main() {
    int arr[6];
    int len = sizeof(arr) / sizeof(int);
    int temp;
    for (int i = 0; i < len; ++i) {
        cin >> arr[i];
    }
    cout << "[";
    for (int i = 0; i < len; ++i) {
        if (i == len - 1) {
            cout << arr[i] << "]" << endl;
            break;
        }
        cout << arr[i] << ", ";
    }
    for (int i = 0; i < len / 2; ++i) {
        temp = arr[i];
        arr[i] = arr[len - 1 - i];
        arr[len - 1 - i] = temp;
    }
    cout << "[";
    for (int i = 0; i < len; ++i) {
        if (i == len - 1) {
            cout << arr[i] << "]" << endl;
            break;
        }
        cout << arr[i] << ", ";
    }
    return 0;
}
